package com.example.MyThread.waitandontify;

import java.util.concurrent.ArrayBlockingQueue;

/**
 * @author Jason
 * @PACKAGE_NAME com.example.MyThread.waitandontify
 * @Description
 * @date 2023-12-10 22:34
 */
public class ThreadDemo {

    public static void main(String[] args) {
        //1.创建阻塞队列的对象
        ArrayBlockingQueue<String> queue = new ArrayBlockingQueue<>(1);

        //2.创建对象的方式传递
        Cook c = new Cook(queue);
        Foodie f = new Foodie(queue);

        c.start();
        f.start();
    }
}
